/*
	YoghurtGum - 2D Game Engine

	Copyright 2009-2011 Quinten Lansu
	
	Licensed under the Apache License, Version 2.0 (the "License"); you may not 
	use this file except in compliance with the License. You may obtain a copy 
	of the License at 
		
		http://www.apache.org/licenses/LICENSE-2.0 
		
	Unless required by applicable law or agreed to in writing, software 
	distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
	License for the specific language governing permissions and limitations 
	under the License. 
*/

#ifndef _YGDEVICE_H_
#define _YGDEVICE_H_

#include "YGSources.h"
#include "YGLog.h"
#include "YGFileManager.h"

namespace YoghurtGum
{

	/*!
		Device is the main interface for the phone. 
		
		You can read hardware-dependent information, such as screen dimensions, using this class.
	*/

	class Log;

	class Device
	{

	public:

		//! Initialize the device
		virtual void Init() = 0;

		virtual void Resize(int a_Width, int a_Height) = 0;

		//! Get the width of the screen
		virtual int GetWidth() = 0;

		//! Get the height of the screen
		virtual int GetHeight() = 0;

		virtual float GetRealWidth() = 0;
		virtual float GetRealHeight() = 0;

		//! Get the working directory
		virtual char* GetWorkingDirectory() = 0;

		//! Get an instance
		static Device& Get();

		static void SetInstance(Device* a_Instance);

		Log* GetLogInstance();
		FileManager* GetFileManagerInstance();

	protected:

		Device();
		~Device();

		static Device* s_Instance;

		Log* m_Log;
		FileManager* m_FileManager;
			
	}; // class Device

}; // namespace YoghurtGum

#endif
